﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link rel="stylesheet" href="../../Styles/jqx.apireference.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery-1.9.0.min.js"></script>
    <meta name="keywords" content="jQuery, Button, Toggle Button, Repeat Button, Link Button, Help Documentation" />
    <meta name="description" content="This page represents the help documentation of the jqxButton, jqxToggleButton, jqxRepeatButton and jqxLinkButton widgets." />
    <title>jqxColorPicker</title>
    <script type="text/javascript">
        $(document).ready(function () {
            $(".documentation-option-type-click").click(function (event) {
                $(event.target).parents('tr').next().find(".property-content").toggle();
            });
        });
    </script>
</head>
<body>
    <div id="properties">
        <h2 class="documentation-top-header">
            Properties</h2>
        <table class="documentation-table">
            <tr>
                <th>
                    Name
                </th>
                <th>
                    Type
                </th>
                <th>
                    Default
                </th>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span2'>disabled</span>
                </td>
                <td>
                    <span>Boolean</span>
                </td>
                <td>
                    false
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                            Enables or disables the color picker.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a color picker with the <code>disabled</code> property specified.
                        </p>
                        <pre><code>$('#colorPicker').jqxColorPicker({disabled: true });</code></pre>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span3'>height</span>
                </td>
                <td>
                    <span>Number/String</span>
                </td>
                <td>
                    null
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                            Sets the height of the color picker.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a color picker with the <code>height</code> property specified.
                        </p>
                        <pre><code>$('#colorPicker').jqxColorPicker({height: 300 });</code></pre>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span4'>width</span>
                </td>
                <td>
                    <span>Number/String</span>
                </td>
                <td>
                    null
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                            Sets the width of the color picker.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a color picker with the <code>width</code> property specified.
                        </p>
                        <pre><code>$('#colorPicker').jqxColorPicker({width: 300 });</code></pre>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span5'>colorMode</span>
                </td>
                <td>
                    <span>String</span>
                </td>
                <td>
                    'saturation'. Possible Values: 'hue', 'saturation'
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                            Sets the color mode.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a color picker with the <code>colorMode</code> property specified.
                        </p>
                        <pre><code>$('#colorPicker').jqxColorPicker({colorMode: 'hue' });</code></pre>
                    </div>
                </td>
            </tr>
          <tr>
                <td class="documentation-option-type-click">
                    <span id='Span6'>showTransparent</span>
                </td>
                <td>
                    <span>String</span>
                </td>
                <td>
                    false
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                            Sets the showTransparent property.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a color picker with the <code>showTransparent</code> property specified.
                        </p>
                        <pre><code>$('#colorPicker').jqxColorPicker({showTransparent: true });</code></pre>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <h2 class="documentation-top-header">
                        Events</h2>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span27'>colorchange</span>
                </td>
                <td>
                    <span>Event</span>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                            This event is triggered when a new color is picked.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Bind to the colorchange event by type: jqxColorPicker.
                        </p>
                        <pre><code>
$('#jqxColorPicker').on('colorchange', function (event) 
{
    var color = event.args;
});
                        </code></pre>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <h2 class="documentation-top-header">
                        Methods</h2>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span37'>setColor</span>
                </td>
                <td>
                    <span>Method</span>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                            Sets a color.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Invoke the setColor method.
                        </p>
                        <pre><code> $("#jqxColorPicker").jqxColorPicker('setColor', '#bbaaff');
                        or
                         $("#jqxColorPicker").jqxColorPicker('setColor', {r: 150, g: 250, b: 255});
                        </code></pre>
                    </div>
                </td>
            </tr>
          <tr>
                <td class="documentation-option-type-click">
                    <span id='Span1'>getColor</span>
                </td>
                <td>
                    <span>Method</span>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                            Gets the color.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Invoke the getColor method.
                        </p>
                        <pre><code>var color = $("#jqxColorPicker").jqxColorPicker('getColor');
                        </code></pre>
                    </div>
                </td>
            </tr>
        <tr>
                <td class="documentation-option-type-click">
                    <span id='Span11'>focus</span>
                </td>
                <td>
                    <span>Method</span>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                            Focuses the widget.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Invoke the "focus" method.
                        </p>
                        <pre><code>$('#widget').jqxColorPicker('focus'); </code></pre>
                    </div>
                </td>
            </tr>
           <tr>
                <td class="documentation-option-type-click">
                    <span id='Span13'>destroy</span>
                </td>
                <td>
                    <span>Method</span>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                            Destroys the widget.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Invoke the "destroy" method.
                        </p>
                        <pre><code>$('#widget').jqxColorPicker('destroy'); </code></pre>
                    </div>
                </td>
            </tr>
        </table>
        <br />
    </div>
</body>
</html>
